<!DOCTYPE html>
<!-- saved from url=(0037)http://127.0.0.1/wx/ybss/zhuce/zc.jsp -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

  <title>收款</title>

  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="format-detection" content="telephone=no, email=no">
  <!--[if IE]>
  <script src="http://127.0.0.1:80/wx/ybss/js/html5shiv.min.js"></script>
  <![endif]-->


  <script type="text/javascript" src="../../script/constants.js"></script>
  <script src="../resource/md5.js"></script>
  <script src="../resource/jquery214.js"></script>
  <script src="../resource/fastclick.js"></script>
  <script src="../resource/jqueryweui.js"></script>
  <script src="../resource/picker.js"></script>
  <script src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/aes.js"></script>
  <script type="text/javascript" charset="UTF-8" src="../../script/naes.js"></script>
  <script type="text/javascript" src="../../script/modeecb.js"></script>
  <script src="../../script/tmd5.js"></script>
  <script>


  </script>

  <style>

   body {
    overflow-x:hidden;
    margin: 0;
   }
   html {
    overflow-x:hidden;
   }
   
label {cursor:pointer;height:40px;}
label i {font-size:18px;font-style:normal;display:inline-block;width:18px;height:18px;text-align:center;line-height:18px;color:#fff;vertical-align:middle;margin:-2px 2px 1px 0px;border:#2489c5 1px solid;}
input[type="checkbox"] {display:none;}
input[type="checkbox"]:checked + i {background:#2489c5;}
input[type="checkbox"]:disabled + i {border-color:#ccc;}
input[type="checkbox"]:checked:disabled + i {background:#ccc;}
   
   .div_img{
       float: left;
       width: 30%;
       text-align: center;
       height: 160px;
       line-heigth: 160px;
    }
   .store{
       height: 120px;
       width:90%;
       margin: 0 auto;
       background: #27a8fa;
       margin-bottom: 15px;
       border-radius:10px;
       display: table;
   }
   .qrImg{
       width: 80%;
       height: 80%;
       position: relative;
       top: 50%;
       transform: translateY(-50%);
   }
   .addStore{
       width:90%;
       margin:0 auto;
       border:1px dashed #27a8fa;
       height: 60px;
       text-align: center;
       background: #fff;
       border-radius:10px;
       line-height: 60px;
       color: #27a8fa;
   }
  </style>

</head>

<body style="background:#F4F4F4;">
<div>
  <div>
       <header id="statusBar">
		<div style="width:100%;display:table;background: #fff;position:fixed;border-bottom:1px solid #EAEAEA;z-index: 9999;height: 50px;" >
			<div style="float:left;width: 20%;height: 50px;line-height: 50px;" tapmode="presshover" onclick="api.closeWin();">
			  <div style="float:left;width: 30%;height: 50px;">
			   <img style="width: 24px;margin-top: 13px;" src="../../image/blc_back.png" />
			   </div>
			   <div style="float:left;width: 50%;">
			   返回
			   </div>
			</div>
			<div style="float:left;width: 60%;height: 50px;line-height: 50px;text-align: center;font-weight:bold;">
			 我的店铺
			</div>
		</div>
	</header>
        <div style="height:70px"></div>
        <div id="store_box">
          
         
        </div>
        <div onclick="addInfo()" tapmode="presshover" class="addStore">
        +添加店铺
        </div>
          
</div>
		<div style="bottom:0;margin-top: 20px;width:100%;height:50px;text-align: center;">四川航天信息有限公司</div>
</div>		
<script>
   
	apiready = function(){
	  api.parseTapmode();
	  if(api.systemType == "ios"){
           document.getElementById("statusBar").style.background = "#298cb4";
      }
	  $api.fixStatusBar( $api.dom('header') );
	   var uiId;
       var UILoading = api.require('UILoading');
		UILoading.flower({
		    center: {
		        x: api.winWidth/2.0,          
		        y: api.winHeight/2.0 
		    },
		    size: 30,
		    mask: "rgba(0,0,0,0.5)",
		    fixed: true
		}, function(ret) {
		    uiId = ret.id;
		});
     	api.addEventListener({
			name: 'addStore'
		}, function(ret, err) {
			window.location.reload();
		});
     	var bdid = $api.getStorage("loginid");
     	var callback = function(ret, err){
     	    //console.log(JSON.stringify(ret));
     	    UILoading.closeFlower({
			    id: uiId
			});
			if(ret){
			if(ret.flag=="Y"){
			var data = ret.data;
	     	for(var i=0;i<data.length;i++){
	     		var s1= "";
	     		var p2 = ""; var p3 = "";
	     		if(data[i].MERLVL=="01"){
	     			s1 = "等级★";
	     		}else if(data[i].MERLVL=="02"){
	     			s1 = "等级★★";
	     		}else if(data[i].MERLVL=="03"){
	     			s1 = "等级★★★";
	     		}
	     		if(data[i].WXALIPAYID==null||data[i].WXALIPAYID==""||data[i].WXALIPAYID=="undefined"){
	     			p2="c";
	     			p3="c";
	     		}
	     		// MERAUTHID IDENAUTHID 为空 1星亮 只亮银联
		     // WXALIPAYID 为空 微信支付宝不点亮
				var s = '<div class="store" >'
                        +'<div onclick="showEwm(\''+data[i].MERID+'\')" tapmode="presshover" style="float:left;width: 35%;text-align: center;height: 120px;">'
                        +'<img  src="../../image/ewm.jpg" class="qrImg"/>'
                        +'</div>'
                        +'<div style="float:left;width: 65%;height: 100%;text-align: center;height: 120px;" onclick="shopinfo(\''+data[i].MERID+'\')" tapmode="presshover">'
                        +'<div style="height: 80%;position: relative;top: 50%; transform: translateY(-50%);">'
                        +'<div style="margin-bottom: 5px;display: table;width: 100%;">'
                        +'<div style="float: left;color:#fff;font-weight:bold;overflow:hidden;">'+data[i].MERNAME+'</div>'
                        +'<div style="float: right;color:#fff;margin-right: 5%;">'+s1+'</div>'
                        +'</div>'
                        +'<div style="clear: both;"></div>'
                        +'<div style="float: left;margin-bottom: 5px;color:#fff;">No.'+data[i].MERID+'</div>'
                        +'<div style="clear: both;"></div>'
                        +'<div style="float: left;">'
                        +'<div style="float:left;color:#fff;margin-top: 3%;">'
                        +'支付方式:'
                        +'</div>'
                        +'<img style="width: 20%;height: 20%;margin:0" src="../../image/jhzf/up.png" />'
				        +'<img style="width: 15%;height: 15%;margin:0" src="../../image/jhzf/wx'+p2+'.png" />'
				        +'<img style="width: 15%;height: 15%;margin:0" src="../../image/jhzf/zfb'+p2+'.png" />'
                        +'</div></div></div></div>';
				$("#store_box").append(s);
	     	}
		     
		}else if(ret.flag == "N"){
		  //api.alert({msg: ""});
		}else{
		  api.alert({msg: ret.msg});
		}
		}else{
		  api.alert({msg: JSON.stringify(err)});
		}
  	  	}
  	  var content = {"id":bdid};
   	  apiAjax(JSON.stringify(content),url.selelctshop,callback);
     }
     
     function shopinfo(merid){
         api.openWin({
	         name: 'storeManage',
	         url: './storeManage.html',
	         pageParam: {
					merid : merid
				}
         });
     }
     
     function addInfo(){
         api.openWin({
	         name: 'storeInfo',
	         url: './storeInfo.html'
         });
     }
     
     function showEwm(merid){
     	api.openWin({
	            name: '二维码 ',
	            url: url.openQr+'?merid='+merid,
	            scrollEnabled:false
	    });		
     }
</script>



</body></html>
